From 8d43373af6618b21bd26d148423b14cfac6ca33d Mon Sep 17 00:00:00 2001 From: "emellor@leeni.uk.xensource.com" Date: Tue, 15 Nov 2005 15:56:47 +0100 Subject: [PATCH] Have the vif scripts expect the offline event, not the remove event. With the remove event, the script environment variable has disappeared, so we must hook on the offline event instead. This fix was put into xen-backend.rules, but not the vif scripts, so they were out of sync, and the interfaces were not being properly closed down. Signed-off-by: Ewan Mellor --- tools/examples/vif-bridge | 2 +- tools/examples/vif-common.sh | 2 +- tools/examples/vif-nat | 2 +- tools/examples/vif-route | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/examples/vif-bridge b/tools/examples/vif-bridge index c4bac8244c..7c8219b9ca 100755 --- a/tools/examples/vif-bridge +++ b/tools/examples/vif-bridge @@ -60,7 +60,7 @@ case "$command" in ifconfig "$vif" up || fatal "ifconfig $vif up failed" ;; - remove) + offline) # vifs are auto-removed from bridge. ifconfig "$vif" down || fatal "ifconfig $vif down failed" ;; diff --git a/tools/examples/vif-common.sh b/tools/examples/vif-common.sh index fe3e6c67d1..9a0640b701 100644 --- a/tools/examples/vif-common.sh +++ b/tools/examples/vif-common.sh @@ -32,7 +32,7 @@ then fi case "$command" in - add | offline) + add | remove) exit 0 ;; esac diff --git a/tools/examples/vif-nat b/tools/examples/vif-nat index 8933285620..a9cf3db424 100644 --- a/tools/examples/vif-nat +++ b/tools/examples/vif-nat @@ -45,7 +45,7 @@ case "$command" in echo 1 >/proc/sys/net/ipv4/conf/${vif}/proxy_arp ipcmd='a' ;; - remove) + offline) ifconfig ${vif} down ipcmd='d' ;; diff --git a/tools/examples/vif-route b/tools/examples/vif-route index 21bc4b18d7..cb46a78238 100755 --- a/tools/examples/vif-route +++ b/tools/examples/vif-route @@ -31,7 +31,7 @@ case "$command" in echo 1 >/proc/sys/net/ipv4/conf/${vif}/proxy_arp ipcmd='a' ;; - remove) + offline) ifdown ${vif} ipcmd='d' ;; -- 2.30.2